<?php 
/*
* 搜索页面模板
*/
if(!defined('EMLOG_ROOT')) {exit('error!');} 
?>
<div id="middle">
<div id="left" style="width:605px;">
<div class="single">
<div class="active">
<?php if(empty($_GET['q'])):?>
<?php elseif(!empty($_GET['q'])):?>
<h1><?php echo $_GET['q'];?></h1>
<?php endif;?>
</div>

<div class="content">
<p>
<div id="cse" style="width:100%;float:left;"></div>
<script src="http://www.google.com/jsapi" type="text/javascript"></script>
<script type="text/javascript">
  google.load('search', '1', {style : google.loader.themes.SHINY}); //这个是自定义google样式
google.setOnLoadCallback(function() {
    var customSearchControl = new google.search.CustomSearchControl('006466164470236732618:a0hbymlk8sc'); //这个也要改成你的
    customSearchControl.setResultSetSize(google.search.Search.FILTERED_CSE_RESULTSET);
    var options = new google.search.DrawOptions();
    var search = '<?php echo $_GET['q']; ?>';//注意q与上面文本输入框的name属性一致！
    options.setInput(document.getElementById('s')); // 传递输入元素
    document.getElementById('searchform').setAttribute('onSubmit',"document.getElementById('s').select(); return false;"); // 按下搜索按钮选中搜索框，并阻止表单提交
    document.getElementById('s').value = search; // 设置搜索框的内容
    options.setAutoComplete(true);//自动完成，不需要此功能可去除此句，建议留下
    customSearchControl.draw('cse', options);//cse为上面div的id
    customSearchControl.execute(search);
}, true);
</script>
</p></div>

</div>
</div>
<div id="right-x">
<?php include View::getView('tabs');
widget_sort("影视分类")?>
<div id="lt_300x250_widget-3">
   <h3 class="widget-title"><span class="title">广而告知</span></h3>
   <div id="ad_300">
    <!-- 广告位：300x250-->
<script type='text/javascript' charset='gb2312' src='http://js.adm.cnzz.net/s.php?sid=35933'></script>
	</div>
	<div id="ad_300">
    <!-- 广告位：300x250-->
<script>u_key='28735'</script>
<script src="http://j.union.ijinshan.com/c.js"></script>
	</div>

</div>
</div><!-- #right closer -->